#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main()
{
	int n = 0;
	int a = 0;
	scanf("%d %d", &a, &n);
	int sum = 0;
	int x = 0;
	while (n--)
	{
		x = x * 10 + a;
		sum += x;
	}
	printf("%d", sum);
	return 0;
}